import javax.swing.*;
import java.awt.event.KeyListener;
public class GameJFrame extends JFrame {
    GameJFrame() {
        GameJPanel gameJPanel = new GameJPanel(200,200);
        this.add(gameJPanel);
        this.addKeyListener(gameJPanel);
        Thread thread = new Thread(gameJPanel);
        thread.start();
        this.setSize(700,500);
//        this.setLocation(100,100);
        this.setVisible(true);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
}
